<?php
$this->breadcrumbs=array(
	Yii::t('main','Settings'),
);

$this->menu=array(
	//array('label'=>Yii::t('main','List'), 'url'=>array('index')),
	//array('label'=>Yii::t('main','Create'), 'url'=>array('create')),
);

Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl.'/css/gridview/styles.css');
$odd=0;
?>

<h1><?php echo Yii::t('main','Update'); ?></h1>

<div class="grid-view">
<?php echo CHtml::beginForm(); ?>
<table class="items">
<thead>
<tr><th><?php echo Yii::t('main','Name')?></th><th><?php echo Yii::t('main','CODE')?></th><th><?php echo Yii::t('main','Value')?></th><th><?php echo Yii::t('main','Comment')?></th></tr>
</thead>
<tbody>
<?php foreach($items as $i=>$item): ?>
<?php $odd=1-$odd; if ($odd) $oddClass='odd'; else $oddClass='even';?>
<tr class="<?=$oddClass?>">
<td><?php echo CHtml::activeTextField($item,"[$i]name", array('style'=>'width:98%;')); ?></td>
<td><?php echo CHtml::activeTextField($item,"[$i]code", array('style'=>'width:98%;')); ?></td>
<td><?php echo CHtml::activeTextField($item,"[$i]value", array('style'=>'width:98%;')); ?></td>
<td><?php echo CHtml::activeTextField($item,"[$i]description",array('size'=>50,'maxlength'=>255,'style'=>'width:98%;')); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="buttons">
	<?php echo CHtml::submitButton(Yii::t('main','Save')); ?>
</div>
<?php echo CHtml::endForm(); ?>
</div><!-- form -->